var CusNameSpace = window.CusNameSpace || {};
/*
 Class UpdateTopState
 Function  Top Refrush
 */
CusNameSpace.CusUpdateTopState = function () {
    this.name = 'CusUpdateTopState';
    this.topBtRecord = new Array();
    this.topBtRecord[0] = "top_right_state_modle";
    this.topBtRecord[1] = "top_right_state_manul_v";
    this.topBtRecord[2] = "top_right_state_auto_v";
    this.topBtRecord[3] = "top_right_state_real_v";
    this.topBtRecord[4] = "top_right_state_real_rotate_v";
    this.topBtRecord[5] = "top_right_state_battery";
    this.topBtRecord[6] = "top_right_state_user";
    this.topBtRecord[7] = "top_right_state_servo";
    this.topBtRecord[8] = "top_right_state_run";
    this.topBtRecord[9] = "top_right_state_mileage";
    this.topBtRecord[10] = "top_right_state_file";
    this.topBtRecord[11] = "top_right_state_msg";
    this.topBtRecord[12] = "top_right_state_position";
    this.topBtRecord[13] = "top_right_state_date";
};

CusNameSpace.CusUpdateTopState.prototype.onInitData = function () {

    //弹出框input 
    this.foucsInputId = "";

    this.variable_local_manual_v = 1;

<<<<<<< HEAD
    this.variable_state_mode = -1;
    this.variable_state_manual_v = -1;
    this.variable_state_auto_v = -1;
    this.variable_state_real_v = -1;
    this.variable_state_rotate_v = -1;
    this.variable_state_battery = -1;
=======
    this.variable_state_mode = 0;
    this.variable_state_manual_v = 0;
    this.variable_state_auto_v = 0;
    this.variable_state_real_v = 0;
    this.variable_state_rotate_v = 0;
    this.variable_state_battery = 0;
>>>>>>> dev
    // 0 操作员　，１管理员 默认为０操作员
    this.variable_state_user = 0;

    //用户登录状态
<<<<<<< HEAD
    this.loginState = -1;
    //用户登录状态
    this.loginPassWd = "";
    this.variable_state_servo = -1;
    this.variable_state_run = -1;

    this.odometer_history = -1;
    this.odometer_user = -1;
    this.time_history = -1;
    this.time_user = -1;

    this.variable_state_file = -1;
    this.variable_state_msg = -1;

    //实际位置显示
    this.vehicle_x = -1;
    this.vehicle_y = -1;
    this.vehicle_r = -1;

    this.read_dpoint_x = -1;
    this.read_dpoint_y = -1;
    this.read_dpoint_r = -1;
=======
    this.loginState = enumTypeLoginResult.kLoginFaild;
    //用户登录状态
    this.loginPassWd = "";
    this.variable_state_servo = 0;
    this.variable_state_run = 0;

    this.odometer_history = 0;
    this.odometer_user = 0;
    this.time_history = 0;
    this.time_user = 0;

    this.variable_state_file = 0;
    this.variable_state_msg = 0;

    //实际位置显示
    this.vehicle_x = 0;
    this.vehicle_y = 0;
    this.vehicle_r = 0;


>>>>>>> dev

    //地图名字
    this.variable_map_name = "";
    //日期
<<<<<<< HEAD
    this.current_data = -1;
    this.currentRobotID = -1;

    //Id
    this.objRobotInfo = new Object();
    this.objRobotInfo.robotId = -1;

    //array for map list
    this.arrayMapName = new Array();
    this.selectMapNameIndex = -1;

    //array for program list
    this.arrayProgramOpen = new Array();
    this.selectProgramOpenIndex = -1;
=======
    this.current_data = 0;
    this.currentRobotID = 0;

    //Id
    this.objRobotInfo = new Object();
    this.objRobotInfo.robotId = 0;

    //array for map list
    this.arrayMapName = new Array();
    this.selectMapNameIndex = 0;

    //array for program list
    this.arrayProgramOpen = new Array();
    this.selectProgramOpenIndex = 0;
>>>>>>> dev

    //查看程序
    this.arrayProgramView = new Array();
    this.arrayProgramViewLine = new Array();
<<<<<<< HEAD
    this.selectProgramViewIndex = -1;

    //position CusNameSpace.CusProgramFileLine
    this.arrayProgramPosition = new Array();
    this.selectProgramPositionIndex = -1;
=======
    this.selectProgramViewIndex = 0;

    //position CusNameSpace.CusProgramFileLine
    this.arrayProgramPosition = new Array();
    this.selectProgramPositionIndex = 0;
>>>>>>> dev


    //DI
    this.arrayDiName = new Array();
    this.arrayDiState = new Array();
<<<<<<< HEAD
    this.selectDiIndex = -1;
=======
    this.selectDiIndex = 0;
>>>>>>> dev

    //DO
    this.arrayDoName = new Array();
    this.arrayDoState = new Array();
<<<<<<< HEAD
    this.selectDoIndex = -1;
=======
    this.selectDoIndex = 0;
>>>>>>> dev

    //消息
    this.arrayMsg = new Array();


    //顶部状态－地图中的位置
    this.is_current_vehicle_position_map_sucess = 0;
<<<<<<< HEAD
    this.current_vehicle_position_map_match_score = 0;
    this.current_vehicle_position_map_x = 0.0;
    this.current_vehicle_position_map_y = 0.0;
    this.current_vehicle_position_map_r = 0.0;
    this.is_current_vehicle_position_vmark_sucess = 0.0;
=======
    this.current_vehicle_position_map_match_score = 0.0;
    this.current_vehicle_position_map_x = 0.0;
    this.current_vehicle_position_map_y = 0.0;
    this.current_vehicle_position_map_r = 0.0;
    
    this.is_current_vehicle_position_vmark_sucess = 0;
>>>>>>> dev
    this.current_vehicle_position_vmark_match_score = 0.0;
    this.current_vehicle_position_vmark_x = 0.0;
    this.current_vehicle_position_vmark_y = 0.0;
    this.current_vehicle_position_vmark_r = 0.0;
<<<<<<< HEAD

    //规避检测
    this.objAvoidInfo = new CusNameSpace.CusAvoidCheckInfo();
=======
    
    this.is_current_vehicle_position_qrcode_sucess = 0;
    this.current_vehicle_position_qrcode_match_score = 0.0;
    this.current_vehicle_position_qrcode_x = 0.0;
    this.current_vehicle_position_qrcode_y = 0.0;
    this.current_vehicle_position_qrcode_r = 0.0;

    //规避检测
    this.objAvoidInfo = new CusNameSpace.CusAvoidCheckInfo();
    //控制器版本信息
    this.objControllerVersionInfo = new CusNameSpace.CusControllerVersionInfo();
    //注册信息
    this.objRegister = new CusNameSpace.CusRegisterInfo();
>>>>>>> dev


};
CusNameSpace.CusUpdateTopState.prototype.requestTopStateAll = function () {
    //获取所有状态
    var cmdRowParent = {};
    var cmdRowChild = {};

    cmdRowChild.user_type = this.variable_state_user;
    cmdRowChild.user_password = this.loginPassWd;
    cmdRowChild.parameter = 2;

    cmdRowParent.get_basic_info = cmdRowChild;
    var sendData = JSON.stringify(cmdRowParent);
<<<<<<< HEAD
    objGlobalVariable.objWebSocket.sendMessage(sendData);
    objGlobalVariable.objCusEventHandle.requestDivState("top_right_state_msg");
    //IO
    objGlobalVariable.objCusEventHandle.requestDivState("second_only_state_ioinfo");
    //获取当前程序执行的行
    objGlobalVariable.objCusEventHandle.requestDivState("robot_running_program_files_info");
    //获取规避检测信息
    objGlobalVariable.objCusEventHandle.requestDivState("second_state_avoid_info");
=======
    window.objGlobalManage.objWebSocket.sendMessage(sendData);
    window.objGlobalManage.objCusEventHandle.requestDivState("top_right_state_msg");
    //IO
    window.objGlobalManage.objCusEventHandle.requestDivState("second_only_state_ioinfo");
    //获取当前程序执行的行
    window.objGlobalManage.objCusEventHandle.requestDivState("robot_running_program_files_info");
    //获取规避检测信息
    window.objGlobalManage.objCusEventHandle.requestDivState("second_state_avoid_info");
>>>>>>> dev

};
//websocket 接受消息处理

CusNameSpace.CusUpdateTopState.prototype.responseTopState = function (msg) {
    var recvMsg = msg;
    var jsonObject = JSON.parse(recvMsg);
<<<<<<< HEAD
=======
    
>>>>>>> dev
    //登录验证
    if (typeof (jsonObject.response_login) != "undefined")
    {
        if (typeof (jsonObject.response_login.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_login.result;
            if (value_data === enumTypeLoginResult.kLoginSuccess)
            {

                //登录成功			
                handleLoginSuccess();
                //记录登录状态
                this.objStructUserInfo.loginState = enumTypeLoginResult.kLoginSuccess;

=======
            var value_data = parseInt(jsonObject.response_login.result);
            if (value_data === enumTypeLoginResult.kLoginSuccess)
            {

                //记录登录状态
                this.loginState = enumTypeLoginResult.kLoginSuccess;
                //登录成功			
                handleLoginSuccess();
>>>>>>> dev
            } else
            {
                //提示登录失败信息
                popTipWindowMsg("登录认证失败！");
            }
        }
    } else if (typeof (jsonObject.response_current_running_program_file) != "undefined")
    {
        //加载程序文件返回结果
        if (typeof (jsonObject.response_current_running_program_file.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_current_running_program_file.result;




=======
            var value_data = parseInt(jsonObject.response_current_running_program_file.result);

            if (value_data === 1)
            {
                //成功跳转到文件查看列表页面-主动触发点击菜单－程序－查看
                window.objGlobalManage.objCusProgramMode.jumpProgramWindowBegin=1;
                window.objGlobalManage.objCusProtocol.func_get_robot_program_files_strings();
                
                $("#second_process_position").click();
            } else
            {
                window.objGlobalManage.objCusProgramMode.jumpProgramWindowBegin=0;
                window.objGlobalManage.objCusProgramMode.jumpProgramWindowOpenToView="";
                popTipWindowMsg("加载文件失败！");
            }
>>>>>>> dev
        }
    } else if (typeof (jsonObject.response_vehicle_initial_position) != "undefined")
    {
        //加载程序文件返回结果
        if (typeof (jsonObject.response_vehicle_initial_position.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_vehicle_initial_position.result;

            if (value_data == 0)
=======
            var value_data = parseInt(jsonObject.response_vehicle_initial_position.result);

            if (value_data == 1)
>>>>>>> dev
            {
                popTipWindowMsg("小车位置初始化成功");
            } else
            {
                popTipWindowMsg("小车位置初始化失败");
            }

        }
    } else if (typeof (jsonObject.response_create_map_start) != "undefined")
    {
        //创建地图返回结果
        if (typeof (jsonObject.response_create_map_start.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_create_map_start.result;
=======
            var value_data = parseInt(jsonObject.response_create_map_start.result);
>>>>>>> dev

            if (value_data == 1)
            {
                popTipWindowMsg("地图创建成功");
            } else
            {
                popTipWindowMsg("地图创建失败");
            }

        }
    } else if (typeof (jsonObject.response_set_save_map) != "undefined")
    {
        //创建地图返回结果
        if (typeof (jsonObject.response_set_save_map.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_set_save_map.result;
=======
            var value_data = parseInt(jsonObject.response_set_save_map.result);
>>>>>>> dev

            if (value_data == 1)
            {
                popTipWindowMsg("保存地图成功");
            } else
            {
                popTipWindowMsg("保存地图失败");
            }

        }
<<<<<<< HEAD
    } else if (typeof (jsonObject.response_record_dpoint) != "undefined")
=======
    }else if (typeof (jsonObject.response_record_dpoint) != "undefined")
>>>>>>> dev
    {
        //创建地图返回结果
        if (typeof (jsonObject.response_record_dpoint.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_record_dpoint.result;
=======
            var value_data = parseInt(jsonObject.response_record_dpoint.result);
>>>>>>> dev

            if (value_data == 1)
            {
                popTipWindowMsg("载入点成功");
            } else
            {
                popTipWindowMsg("载入点失败");
            }
<<<<<<< HEAD

        }
    } else if (typeof (jsonObject.response_vmark_type) != "undefined")
=======
	}
    }else if (typeof (jsonObject.response_vmark_type) != "undefined")
>>>>>>> dev
    {
        //创建地图返回结果
        if (typeof (jsonObject.response_vmark_type.result) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_vmark_type.result;
=======
            var value_data = parseInt(jsonObject.response_vmark_type.result);
>>>>>>> dev

            if (value_data == 1)
            {
                popTipWindowMsg("Vmark设置成功");
            } else
            {
                popTipWindowMsg("Vmark设置失败");
            }

        }
<<<<<<< HEAD
    } else if (typeof (jsonObject.response_basic_info) != "undefined")
    {
        //

=======
    } 
    
    else if (typeof (jsonObject.response_set_default_map_name) != "undefined")
    {
        //设置程序运行行号返回结果
        if (typeof (jsonObject.response_set_default_map_name.result) != "undefined")
        {
            var value_data = parseInt(jsonObject.response_set_default_map_name.result);
            if (value_data == 1)
            {
                popTipWindowMsg("设置默认地图成功");
            } else
            {
                popTipWindowMsg("设置默认地图失败");
            }
        }
    }
    
    else if (typeof (jsonObject.response_set_default_file_name) != "undefined")
    {
        //设置默认程序返回结果
        if (typeof (jsonObject.response_set_default_file_name.result) != "undefined")
        {
            var value_data = parseInt(jsonObject.response_set_default_file_name.result);
            if (value_data === enumTypeCmdResultDefaultProgram.kSuccuss)
            {
                popTipWindowMsg("设置默认程序成功");
            } else if(value_data === enumTypeCmdResultDefaultProgram.kPermissionDenied)
            {
                popTipWindowMsg("设置默认程序失败,没有权限");
            }
            else if(value_data === enumTypeCmdResultDefaultProgram.kRuning)
            {
                popTipWindowMsg("设置默认程序失败,程序正在运行");
            }
            else if(value_data === enumTypeCmdResultDefaultProgram.kWriteFaild)
            {
                popTipWindowMsg("设置默认程序失败,文件写入失败");
            }
        }
    }
    else if (typeof (jsonObject.response_basic_info) != "undefined")
    {
>>>>>>> dev
        //状态获取处理
        //模式
        if (typeof (jsonObject.response_basic_info.mode) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.mode;
            this.variable_state_mode = value_data;
            //设置当前选中模式

            //显示当前模式
            var nameValue = "#" + this.topBtRecord[0] + " .top_right_item";

<<<<<<< HEAD
            if (value_data == 0)
            {
                $(nameValue).text("T1");
                $(".group_top_pop_mode").css("background-color","#337ab7");
		$("#id_top_state_pop_w_mode_t1").css("background-color","#3d4e60");
            } else if (value_data == 1)
            {
                $(nameValue).text("T2");
                $(".group_top_pop_mode").css("background-color","#337ab7");
		$("#id_top_state_pop_w_mode_t2").css("background-color","#3d4e60");
            } else if (value_data == 2)
            {
                $(nameValue).text("AUTO");
                $(".group_top_pop_mode").css("background-color","#337ab7");
		$("#id_top_state_pop_w_mode_auto").css("background-color","#3d4e60");
            } else if (value_data == 3)
            {
                $(nameValue).text("EXT");
                $(".group_top_pop_mode").css("background-color","#337ab7");
		$("#id_top_state_pop_w_mode_ext").css("background-color","#3d4e60");
=======
            if (value_data === enumTypeMode.kModeT1)
            {
                $(nameValue).text("T1");
                $(".group_top_pop_mode").css("background-color", "#337ab7");
                $("#id_top_state_pop_w_mode_t1").css("background-color", "#3d4e60");
            } else if (value_data === enumTypeMode.kModeT2)
            {
                $(nameValue).text("T2");
                $(".group_top_pop_mode").css("background-color", "#337ab7");
                $("#id_top_state_pop_w_mode_t2").css("background-color", "#3d4e60");
            } else if (value_data === enumTypeMode.kModeAuto)
            {
                $(nameValue).text("AUTO");
                $(".group_top_pop_mode").css("background-color", "#337ab7");
                $("#id_top_state_pop_w_mode_auto").css("background-color", "#3d4e60");
            } else if (value_data === enumTypeMode.kModeExt)
            {
                $(nameValue).text("EXT");
                $(".group_top_pop_mode").css("background-color", "#337ab7");
                $("#id_top_state_pop_w_mode_ext").css("background-color", "#3d4e60");
            }
            else if(value_data === enumTypeMode.kModeFleet)
            {
                $(nameValue).text("FLEET");
                $(".group_top_pop_mode").css("background-color", "#337ab7");
                $("#id_top_state_pop_w_mode_fleet").css("background-color", "#3d4e60");
                
>>>>>>> dev
            }

        }
        if (typeof (jsonObject.response_basic_info.manual_ratio) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.manual_ratio;
            this.variable_state_manual_v = value_data;

            //设置滑动条进度
            //显示当前手动速度
            var nameValue = "#" + this.topBtRecord[1] + " .top_right_item";
            var showData = "手速" + this.variable_state_manual_v;
            $(nameValue).text(showData);
            $('#slider-1').slider('setValue', this.variable_state_manual_v);


        }
        if (typeof (jsonObject.response_basic_info.auto_ratio) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.auto_ratio;
            this.variable_state_auto_v = value_data;
            //设置滑动条进度
            //显示当前自动速度
            var nameValue = "#" + this.topBtRecord[2] + " .top_right_item";
            var showData = "自速" + this.variable_state_auto_v;
            $(nameValue).text(showData);
            $('#slider-2').slider('setValue', this.variable_state_auto_v);
        }

        if (typeof (jsonObject.response_basic_info.vehicle_speed_line) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.vehicle_speed_line;
            this.variable_state_real_v = value_data;


            // 显示当前实际速度

            var nameValue = "#" + this.topBtRecord[3] + " .top_right_item";
            var showData = "车速" + this.variable_state_real_v.toFixed(2);
            $(nameValue).text(showData);
        }
        if (typeof (jsonObject.response_basic_info.vehicle_speed_rotate) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.vehicle_speed_rotate;
            this.variable_state_rotate_v = value_data;
            // 显示当前实际转速
            var nameValue = "#" + this.topBtRecord[4] + " .top_right_item";
            var showData = "转速" + this.variable_state_rotate_v.toFixed(2);
            $(nameValue).text(showData);
        }
        if (typeof (jsonObject.response_basic_info.battery_info) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.battery_info;
            this.variable_state_battery = value_data * 100;


            //显示当前电池电量
            var nameValue = "#" + this.topBtRecord[5] + " .top_right_item";
            var showData = "电量" + this.variable_state_battery.toFixed(2);
            $(nameValue).text(showData);
            $("#pop_battery_info").text(this.variable_state_battery.toFixed(2));

        }
        if (typeof (jsonObject.response_basic_info.user_type) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.user_type;
            this.variable_state_user = value_data;

            //显示用户类型
            var nameValue = "#" + this.topBtRecord[6] + " .top_right_item";

            if (this.variable_state_user == 0)
            {
                var showData = "操作员";
                $(nameValue).text(showData);
            } else if (this.variable_state_user == 1)
            {
                var showData = "管理员";
                $(nameValue).text(showData);
            }

        }
        if (typeof (jsonObject.response_basic_info.servo_status) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.servo_status;

            this.variable_state_servo = value_data;
            //显示私服状态
            var nameValue = "#" + this.topBtRecord[7] + " .top_right_item";


<<<<<<< HEAD
            if (this.variable_state_servo == 0)
            {
                var showData = "电机无效";
                $(nameValue).text(showData);
                $(nameValue).css("color","white");
                
            } else if (this.variable_state_servo == 1)
            {
                var showData = "电机使能";
                $(nameValue).text(showData);
                $(nameValue).css("color","green");
=======
            if (this.variable_state_servo == enumTypeServo.kServoClose)
            {
                var showData = "电机无效";
                $(nameValue).text(showData);
                $(nameValue).css("color", "white");

            } else if (this.variable_state_servo == enumTypeServo.kServoOpen)
            {
                var showData = "电机使能";
                $(nameValue).text(showData);
                $(nameValue).css("color", "green");
>>>>>>> dev
            }
        }
        if (typeof (jsonObject.response_basic_info.run_status) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.run_status;

            this.variable_state_run = value_data;
            //运行状态
            var nameValue = "#" + this.topBtRecord[8] + " .top_right_item";
<<<<<<< HEAD
            if (this.variable_state_run == 0)
            {
                var showData = "停止";
                $(nameValue).text(showData);
                $(nameValue).css("color","white");
                
            } else if (this.variable_state_run == 1)
            {
                var showData = "运行";
                $(nameValue).text(showData);
                $(nameValue).css("color","green");
            } else if (this.variable_state_run == 2)
            {
                var showData = "暂停";
                $(nameValue).text(showData);
                $(nameValue).css("color","#ff7b00");
=======
            if (this.variable_state_run === enumTypeExecuteState.kStateCease)
            {
                var showData = "停止";
                $(nameValue).text(showData);
                $(nameValue).css("color", "white");

            } else if (this.variable_state_run === enumTypeExecuteState.kStateRun)
            {
                var showData = "运行";
                $(nameValue).text(showData);
                $(nameValue).css("color", "green");
            } else if (this.variable_state_run === enumTypeExecuteState.kStatePuase)
            {
                var showData = "暂停";
                $(nameValue).text(showData);
                $(nameValue).css("color", "#ff7b00");
>>>>>>> dev
            }
        }
        if (typeof (jsonObject.response_basic_info.odometer_history) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.odometer_history;

            this.odometer_history = value_data;

            var nameValue = "#" + this.topBtRecord[9] + " .top_right_item";
            var showData = "里程" + this.odometer_history.toFixed(0);
            $(nameValue).text(showData);

            //弹出框显示
            showData = "总里程:" + this.odometer_history.toFixed(0);
            $("#id_top_pop_w_odometer_history").text(showData);
        }
        if (typeof (jsonObject.response_basic_info.odometer_user) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.odometer_user;
            this.odometer_user = value_data;
            //弹出框显示
            showData = "短里程:" + this.odometer_user.toFixed(0);
            $("#id_top_pop_w_odometer_user").text(showData);
        }
        if (typeof (jsonObject.response_basic_info.time_history) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.time_history;
            this.time_history = value_data;

            //弹出框显示
            showData = "总时间:" + this.time_history.toFixed(0);
            $("#id_top_pop_w_time_history").text(showData);
        }
        if (typeof (jsonObject.response_basic_info.time_user) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.time_user;
            this.time_user = value_data;
            //弹出框显示
            showData = "短时间:" + this.time_user.toFixed(0);
            $("#id_top_pop_w_time_user").text(showData);
        }
        if (typeof (jsonObject.response_basic_info.current_file) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_file;
            this.variable_state_file = value_data;

            var nameValue = "#" + this.topBtRecord[10] + " .top_right_item";
            $(nameValue).text(this.variable_state_file);
            $("#id_top_pop_w_file").text(this.variable_state_file);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_x) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_x;

            this.vehicle_x = value_data;
            showData = "X:" + value_data.toFixed(3);
            $("#id_top_pop_w_positionx").text(showData);


        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_y) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_y;
            this.vehicle_y = value_data;
            showData = "Y:" + value_data.toFixed(3);

            $("#id_top_pop_w_positiony").text(showData);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_r) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_r;
            this.vehicle_r = value_data;
            showData = "R:" + value_data.toFixed(3);
            $("#id_top_pop_w_positionr").text(showData);
        }
        if (typeof (jsonObject.response_basic_info.current_map) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_map;
            this.variable_map_name = value_data;
            var nameValue = "#" + this.topBtRecord[12] + " .top_right_item";
            $(nameValue).text(value_data);
        }


        if (typeof (jsonObject.response_basic_info.current_data) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_data;
            this.current_data = value_data;
            var nameValue = "#" + this.topBtRecord[13] + " .top_right_item";
            var dateTime = "";

            if (value_data.length > 10)
            {
                var splitLen = value_data.length - 10;
                dateTime = value_data.substr(10, splitLen);
                $(nameValue).text(dateTime);
            } else
            {
                $(nameValue).text(value_data);
            }

            $("#id_top_pop_w_date").text(value_data);
        }
        if (typeof (jsonObject.response_basic_info.currentRobotID) != "undefined")
        {
            //var nameValue = "#" + this.topBtRecord[13] + " .top_right_item";
            //$(nameValue).text(value_data);
        }

        //地图中位置　　　
        if (typeof (jsonObject.response_basic_info.is_current_vehicle_position_map_sucess) != "undefined")
        {
            //状态
            var value_data = jsonObject.response_basic_info.is_current_vehicle_position_map_sucess;
            this.is_current_vehicle_position_map_sucess = value_data;

            if (this.is_current_vehicle_position_map_sucess)
            {
                $("#id_page_program_vehicle_p_list_item_state").text("成功");
            } else
            {
                $("#id_page_program_vehicle_p_list_item_state").text("失败");
            }
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_map_match_score) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_basic_info.current_vehicle_position_map_match_score;
            this.current_vehicle_position_map_match_score = value_data;
=======
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_map_match_score);
            this.current_vehicle_position_map_match_score = value_data;

>>>>>>> dev
            $("#id_page_program_vehicle_p_list_item_score").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_map_x) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_basic_info.current_vehicle_position_map_x;
            this.current_vehicle_position_map_x = value_data;
            $("#id_page_program_vehicle_p_list_item_x").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_map_y) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_map_y;
            this.current_vehicle_position_map_y = value_data;
            $("#id_page_program_vehicle_p_list_item_y").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_map_r) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_map_r;
            this.current_vehicle_position_map_r = value_data;
            var valueShow = value_data * 180 / 3.1415926;
            $("#id_page_program_vehicle_p_list_item_r").text(valueShow.toFixed(3));
=======
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_map_x);
            this.current_vehicle_position_map_x = value_data;

            var toShowMsg = value_data;
            toShowMsg = toShowMsg.toFixed(3);
            toShowMsg += " m";

            $("#id_page_program_vehicle_p_list_item_x").text(toShowMsg);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_map_y) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_map_y);
            this.current_vehicle_position_map_y = value_data;

            var toShowMsg = value_data;
            toShowMsg = toShowMsg.toFixed(3);
            toShowMsg += " m";

            $("#id_page_program_vehicle_p_list_item_y").text(toShowMsg);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_map_r) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_map_r);
            this.current_vehicle_position_map_r = value_data;

            var valueShow = value_data * 180 / 3.1415926;

            var toShowMsg = valueShow.toFixed(3);
            toShowMsg += " deg";

            $("#id_page_program_vehicle_p_list_item_r").text(toShowMsg);
>>>>>>> dev
        }
        //vmark中位置
        if (typeof (jsonObject.response_basic_info.is_current_vehicle_position_vmark_sucess) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.is_current_vehicle_position_vmark_sucess;
            this.is_current_vehicle_position_vmark_sucess = value_data;
            if (this.is_current_vehicle_position_vmark_sucess)
            {
                $("#id_page_program_vmark_p_list_item_state").text("成功");
            } else
            {
                $("#id_page_program_vmark_p_list_item_state").text("失败");
            }
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_vmark_match_score) != "undefined")
        {
            //评分
            var value_data = jsonObject.response_basic_info.current_vehicle_position_vmark_match_score;
            this.current_vehicle_position_vmark_match_score = value_data;
<<<<<<< HEAD


=======
>>>>>>> dev
            $("#id_page_program_vmark_p_list_item_score").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_vmark_x) != "undefined")
        {
<<<<<<< HEAD
            var value_data = jsonObject.response_basic_info.current_vehicle_position_vmark_x;
            this.current_vehicle_position_vmark_x = value_data;
            $("#id_page_program_vmark_p_list_item_x").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_vmark_y) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_vmark_y;
            this.current_vehicle_position_vmark_y = value_data;
            $("#id_page_program_vmark_p_list_item_y").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_vmark_r) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.current_vehicle_position_vmark_r;
            this.current_vehicle_position_vmark_r = value_data;
            var valueShow = value_data * 180 / 3.1415926;
            $("#id_page_program_vmark_p_list_item_r").text(valueShow.toFixed(3));
        }

    } else if (typeof (jsonObject.response_msg_info) != "undefined")
=======
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_vmark_x);
            this.current_vehicle_position_vmark_x = value_data;

            var toShowMsg = value_data;
            toShowMsg = toShowMsg.toFixed(3);
            toShowMsg += " m";

            $("#id_page_program_vmark_p_list_item_x").text(toShowMsg);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_vmark_y) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_vmark_y);
            this.current_vehicle_position_vmark_y = value_data;

            var toShowMsg = value_data;
            toShowMsg = toShowMsg.toFixed(3);
            toShowMsg += " m";
            $("#id_page_program_vmark_p_list_item_y").text(toShowMsg);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_vmark_r) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_vmark_r);
            this.current_vehicle_position_vmark_r = value_data;
            var valueShow = value_data * 180 / 3.1415926;

            var toShowMsg = valueShow.toFixed(3);
            toShowMsg += " deg";
            $("#id_page_program_vmark_p_list_item_r").text(toShowMsg);
        }
        //qrcode中位置
        if (typeof (jsonObject.response_basic_info.is_current_vehicle_position_qrcode_sucess) != "undefined")
        {
            var value_data = jsonObject.response_basic_info.is_current_vehicle_position_qrcode_sucess;
            this.is_current_vehicle_position_qrcode_sucess = value_data;
            if (this.is_current_vehicle_position_qrcode_sucess)
            {
                $("#id_page_program_qrcode_p_list_item_state").text("成功");
            } else
            {
                $("#id_page_program_qrcode_p_list_item_state").text("失败");
            }
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_qrcode_match_score) != "undefined")
        {
            //评分
            var value_data = jsonObject.response_basic_info.current_vehicle_position_qrcode_match_score;
            this.current_vehicle_position_qrcode_match_score = value_data;
            $("#id_page_program_qrcode_p_list_item_score").text(value_data.toFixed(3));
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_qrcode_x) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_qrcode_x);
            this.current_vehicle_position_qrcode_x = value_data;

            var toShowMsg = value_data;
            toShowMsg = toShowMsg.toFixed(3);
            toShowMsg += " m";

            $("#id_page_program_qrcode_p_list_item_x").text(toShowMsg);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_qrcode_y) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_qrcode_y);
            this.current_vehicle_position_qrcode_y = value_data;

            var toShowMsg = value_data;
            toShowMsg = toShowMsg.toFixed(3);
            toShowMsg += " m";
            $("#id_page_program_qrcode_p_list_item_y").text(toShowMsg);
        }
        if (typeof (jsonObject.response_basic_info.current_vehicle_position_qrcode_r) != "undefined")
        {
            var value_data = parseFloat(jsonObject.response_basic_info.current_vehicle_position_qrcode_r);
            this.current_vehicle_position_qrcode_r = value_data;
            var valueShow = value_data * 180 / 3.1415926;

            var toShowMsg = valueShow.toFixed(3);
            toShowMsg += " deg";
            $("#id_page_program_qrcode_p_list_item_r").text(toShowMsg);
        }
    } 
    else if (typeof (jsonObject.response_msg_info) != "undefined")
>>>>>>> dev
    {	//消息
        if (typeof (jsonObject.response_msg_info.msg_list) != "undefined")
        {
            var value_data = jsonObject.response_msg_info.msg_list;
            var itemElement = "";
            var parent = $("#id_page_state_m_msg_list");
            //清除所有的子元素
            parent.empty();
            var json = jsonObject.response_msg_info.msg_list;

            //清除缓存的消息
            this.arrayMsg = [];
            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {
                    var cl_flag = i % 2 + 1;
<<<<<<< HEAD
                    itemElement = '<div id="page_process_m_msg_section' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += 'class="container-fluid c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i] + "</p></div>";
=======
                    
                    
                    var baseAdd = 20;
                    var baseHeight = 30;
                    var lineCharacterCount=43;
                    var itemHeightReal = 0;
                    itemHeightReal = baseHeight+(json[i].length/lineCharacterCount)*baseAdd;
                
                
                    itemElement = '<div style="height:'+itemHeightReal+'px;" id="page_process_m_msg_section' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += 'class="container-fluid c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;width:100%;text-align: left;height: auto; word-wrap:break-word; word-break:break-all;overflow: hidden;">' + json[i] + "</p></div>";
>>>>>>> dev
                    $("#id_page_state_m_msg_list").append(itemElement);

                    this.arrayMsg[i] = json[i];
                    /*
                     <div id="page_process_m_open_section2" item-index="" class="container-fluid c_page_state_m_systeminfo_text2">
                     <p style="float: left;">map_name.p</p>
                     <img class="page_process_m_open_list_n" src="img/list_select_n.png"  style="float: right;width: 25px;height: 25px;float: right;"/>										
                     </div>*/
                }
            } else
            {

                var parent = $("#id_page_state_m_msg_list");
                //清除所有的子元素
                parent.empty();
                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '没有数据！</div>';
                $("#id_page_state_m_msg_list").append(itemElement);
            }
        }
    } else if (typeof (jsonObject.response_map_list) != "undefined")
    {	//map地图
        if (typeof (jsonObject.response_map_list.map_list) != "undefined")
        {
            //{"response_map_list":{"map_list":["msg","msg","msg","msg","msg"]}}
            var value_data = jsonObject.response_map_list.map_list;
            var itemElement = "";
            var parent = $("#id_page_state_m_map_list");
            //清除所有的子元素
            parent.empty();
            var json = value_data;
            if (json.length > 0)
            {
                this.arrayMapName = [];
                for (var i = 0, l = json.length; i < l; i++) {
                    var cl_flag = i % 2 + 1;
                    itemElement = '<div id="page_map_m_list_section' + i + '"';
                    itemElement += ' class="container-fluid c_page_state_m_systeminfo_text' + cl_flag + '">';
<<<<<<< HEAD
                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
                    itemElement += '<button type="button" item-index="' + i + '"';
                    itemElement += ' class="btn btn-primary cl_bt_page_state_m_map_list" style="float: right;"> 加载 </button></div>';
=======
                    itemElement += '<div style="float: left;width: 70%">';
                    itemElement += '<p style="float: left;">' + json[i] + '</p></div>';
                    itemElement += '<div style="float: right;width: 30%">';
                    itemElement += '<button type="button" item-index="' + i + '"';
                    itemElement += ' class="btn btn-primary cl_bt_page_m_map_set_default" style="float: left;"> 设置默认 </button>';
                    itemElement += '<button type="button" item-index="' + i + '"';
                    itemElement += ' class="btn btn-primary cl_bt_page_state_m_map_list" style="float: right;"> 加载 </button></div></div>';
>>>>>>> dev

                    $("#id_page_state_m_map_list").append(itemElement);
                    this.arrayMapName[i] = json[i];
                }
<<<<<<< HEAD
                //js动态加载的元素要重新添加事件绑定,否则无法触发事件
                $("#id_page_state_m_map_list").on("click", ".cl_bt_page_state_m_map_list", function (e) {
                    objGlobalVariable.objCusEventHandle.eventBtHandle(e);
                })
            } else
            {

=======
            } else
            {
>>>>>>> dev
                var parent = $("#id_page_state_m_map_list");
                //清除所有的子元素
                parent.empty();

                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '<p>没有数据！</p></div>';

                $("#id_page_state_m_map_list").append(itemElement);
            }
        }
    } else if (typeof (jsonObject.response_robot_program_file_list) != "undefined")
    {
        //程序打开列表
        if (typeof (jsonObject.response_robot_program_file_list.file_list) != "undefined")
        {

            var value_data = jsonObject.response_robot_program_file_list.file_list;
            var itemElement = "";

            var parent = $("#id_page_state_m_program_open_list");
            //清除所有的子元素
            parent.empty();
            var json = value_data;
            //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}
            if (json.length > 0)
            {

                this.arrayProgramOpen = [];

                for (var i = 0, l = json.length; i < l; i++) {

                    var cl_flag = i % 2 + 1;
                    itemElement = '<div id="page_process_m_open_section' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid c_page_state_m_process_item event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
<<<<<<< HEAD
                    itemElement += '<img class="page_process_m_open_list_n" src="img/list_select_n.png"  style="float: right;width: 25px;height: 25px;float: right;"/></div>';
                    $("#id_page_state_m_program_open_list").append(itemElement);
                    this.arrayProgramOpen[i] = json[i];
                }
                //js动态加载的元素要重新添加事件绑定,否则无法触发事件
                $("#id_page_state_m_program_open_list").on("click", ".event_click", function (e) {
                    objGlobalVariable.objCusEventHandle.eventDivHandle(e);
                })
=======
                    itemElement += '</div>';
                    $("#id_page_state_m_program_open_list").append(itemElement);
                    this.arrayProgramOpen[i] = json[i];
                }
>>>>>>> dev
            } else
            {
                var parent = $("#id_page_state_m_program_open_list");
                //清除所有的子元素
                parent.empty();
                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '<p>没有数据！</p></div>';
                $("#id_page_state_m_program_open_list").append(itemElement);
            }
        }
    } else if (typeof (jsonObject.response_robot_running_program_files_info) != "undefined")
    {
        //程序查看
<<<<<<< HEAD

        /*
         if(typeof(jsonObject.response_robot_running_program_files_info.files_info) != "undefined")
         {
         var value_data=jsonObject.response_robot_running_program_files_info.files_info;
         var itemElement = "";
         var parent=$("#id_page_m_process_view_list");
         //清除所有的子元素
         parent.empty();
         var json = value_data;
         if(json.length>0)
         {
         this.arrayProgramView=[];
         for(var i=0,l=json.length;i<l;i++){
         var cl_flag=i%2+1;
         itemElement = '<div id="page_process_m_view_section' + i;
         itemElement += '" item-index="' + i + '"';
         itemElement += ' class="container-fluid c_page_state_m_systeminfo_text' + cl_flag +'">';
         itemElement += '<p style="float: left;">' + json[i].file_name +  " 行号:" + json[i].file_current_line  +"</p>";
         itemElement += '</div>';
         $("#id_page_m_process_view_list").append(itemElement);
         this.arrayProgramView[i] = json[i].file_name;
         this.arrayProgramViewLine[i] = json[i].file_current_line;
         }
         }
         else
         {
         var parent=$("#id_page_m_process_view_list");
         //清除所有的子元素
         parent.empty();
         var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
         itemElement += '<p>没有数据！</p></div>';
         
         $("#id_page_m_process_view_list").append(itemElement);
         }	
         }
         */

=======
>>>>>>> dev
        //刷新程序点位－指令内容－当前行号
        if (typeof (jsonObject.response_robot_running_program_files_info.files_info) != "undefined")
        {
            var value_data = jsonObject.response_robot_running_program_files_info.files_info;
            //清除所有的子元素
            var json = value_data;
            if (json.length > 0)
            {
                var arrayFileData = this.arrayProgramPosition;
                for (var i = 0, l = json.length; i < l; i++) {

                    var findFileNameIndex = -1;
                    for (var n = 0, m = arrayFileData.length; n < m; n++) {

                        if (arrayFileData[n].fileName == json[i].file_name)
                        {
                            findFileNameIndex = n;
                            break;
                        }
                    }
                    if (findFileNameIndex != -1)
                    {
                        //取到行号
                        this.arrayProgramPosition[findFileNameIndex].fileLine = json[i].file_current_line;
                        //更新行
                        var currentLineId = "id_page_process_m_position_fileline" + this.arrayProgramPosition[findFileNameIndex].fileLine;

                        //上一次设置的行背景色还原
                        var forwardFileLine = this.arrayProgramPosition[findFileNameIndex].forwardFileLine;
                        if (forwardFileLine >= 0)
                        {
<<<<<<< HEAD
                            var bgFlag = forwardFileLine % 2;
                            if (bgFlag == 0)
                            {
                                $("#id_page_process_m_position_fileline" + forwardFileLine).css("background-color", "#5fa2cf");
                            } else
                            {
                                $("#id_page_process_m_position_fileline" + forwardFileLine).css("background-color", "#5cc3ff");
                            }


                        }

                        this.arrayProgramPosition[findFileNameIndex].forwardFileLine = json[i].file_current_line;

                        //设置当前行颜色
                        $("#" + currentLineId).css("background-color", "green");
=======
                            $("#id_page_process_m_position_fileline" + forwardFileLine).removeClass("c_page_state_m_systeminfo_text_green");
                            $("#id_page_process_m_position_fileline" + forwardFileLine).removeClass("c_page_state_m_systeminfo_text_sel");
                        }

                        this.arrayProgramPosition[findFileNameIndex].forwardFileLine = json[i].file_current_line;
                        //设置当前行颜色
                        $("#" + currentLineId).addClass("c_page_state_m_systeminfo_text_green");
>>>>>>> dev
                    }
                }
            }
        }
<<<<<<< HEAD


    } else if (typeof (jsonObject.response_robot_program_files_strings) != "undefined")
=======
    }
    else if (typeof (jsonObject.response_robot_program_files_strings) != "undefined")
>>>>>>> dev
    {
        //程序点位
        if (typeof (jsonObject.response_robot_program_files_strings.files_info) != "undefined")
        {
<<<<<<< HEAD

=======
            var languageType = enumTypeProgramLanguageType.kLanuageCh;
            if(typeof (jsonObject.response_robot_program_files_strings.language_type) != "undefined")
            {
                //程序语言
                languageType = parseInt(jsonObject.response_robot_program_files_strings.language_type);
            }
            
>>>>>>> dev
            var value_data = jsonObject.response_robot_program_files_strings.files_info;
            var itemElement = "";
            var parent = $("#id_page_m_process_position_filename");
            //清除所有的子元素
<<<<<<< HEAD
            parent.empty();
            var json = value_data;


            //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}
            if (json.length > 0)
            {
                this.arrayProgramPosition = [];

                for (var i = 0, l = json.length; i < l; i++) {


                    //缓存文件数据
                    var programPositionInfo = new CusNameSpace.CusProgramFileLine();
=======
            
            if(languageType === window.objGlobalManage.objCusProgramMode.languageProgramString)
            {
                parent.empty();
            }
            
            
            var json = value_data;
            //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}

            //打开程序自动跳转到文件内容列表
            var isOpenFileJump = 0;
            var beOpenFileIndex = -1;
            if (window.objGlobalManage.objCusProgramMode.jumpProgramWindowOpenToView.length > 0)
            {
                isOpenFileJump = 1;
            }
            if (json.length > 0)
            {
                if(languageType === enumTypeProgramLanguageType.kLanuageEn)
                {
                    this.arrayProgramPosition = [];
                }
                
                for (var i = 0, l = json.length; i < l; i++) {

                    //缓存文件数据
                    var programPositionInfo = null;
                    
                    if(languageType === enumTypeProgramLanguageType.kLanuageEn)
                    {
                        programPositionInfo=new CusNameSpace.CusProgramFileLine();
                    }
                    else
                    {
                        if(i<this.arrayProgramPosition.length)
                        {
                            programPositionInfo=this.arrayProgramPosition[i];
                        }
                    }
                    
>>>>>>> dev
                    programPositionInfo.fileName = json[i].file_name;
                    programPositionInfo.fileLine = json[i].file_current_line;
                    var childItemData = json[i].file_lines;

<<<<<<< HEAD

                    for (var n = 0, m = childItemData.length; n < m; n++) {
                        programPositionInfo.arrayFileData[n] = childItemData[n];

                    }
                    this.arrayProgramPosition.push(programPositionInfo);
                    //显示文件名信息	
                    var cl_flag = i % 2 + 1;
                    itemElement = '<div id="id_page_process_m_position_filename' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid c_page_m_process_position_filename event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i].file_name + " 行号:" + json[i].file_current_line + "</p>";
                    itemElement += '</div>';
                    $("#id_page_m_process_position_filename").append(itemElement);
                }
                //js动态加载的元素要重新添加事件绑定,否则无法触发事件
                $("#id_page_m_process_position_filename").on("click", ".event_click", function (e) {
                    objGlobalVariable.objCusEventHandle.eventDivHandle(e);
                })
            } else
            {
=======
                    
                    if (isOpenFileJump === 1)
                    {   
                        //是否打开文件直接跳转到指令界面
                        if (programPositionInfo.fileName === window.objGlobalManage.objCusProgramMode.jumpProgramWindowOpenToView)
                        {
                            isOpenFileJump = 2;
                            beOpenFileIndex = i;
                        }
                    }
                    //根据不同指令显示语言保存到制定位置
                    for (var n = 0, m = childItemData.length; n < m; n++) {
                        programPositionInfo.GetArrayFileDataFromType(languageType)[n] = childItemData[n];
                    }
                    
                    this.arrayProgramPosition.push(programPositionInfo);
                    //显示文件名信息
                    if(languageType === window.objGlobalManage.objCusProgramMode.languageProgramString)
                    {
                        var cl_flag = i % 2 + 1;
                        itemElement = '<div id="id_page_process_m_position_filename' + i;
                        itemElement += '" item-index="' + i + '"';
                        itemElement += ' class="container-fluid c_page_m_process_position_filename event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                        itemElement += '<p style="float: left;">' + json[i].file_name + " 行号:" + json[i].file_current_line + "</p>";
                        itemElement += '</div>';
                        $("#id_page_m_process_position_filename").append(itemElement);
                    }
                    
                }
    
                if (beOpenFileIndex !== -1)
                { 
                    window.objGlobalManage.objCusProgramMode.jumpProgramWindowOpenToView = "";
                    $("#id_page_process_m_position_filename" + beOpenFileIndex).click();
                }
                
            } else
            {               
>>>>>>> dev
                var parent = $("#id_page_m_process_position_filename");
                //清除所有的子元素
                parent.empty();
                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '<p>没有数据！</p></div>';
                $("#id_page_m_process_position_filename").append(itemElement);
            }
        }
<<<<<<< HEAD
    } else if (typeof (jsonObject.response_ultrasonic_sensor_check_info) != "undefined")
=======
    }
    else if (typeof (jsonObject.response_ultrasonic_sensor_check_info) != "undefined")
>>>>>>> dev
    {
        //超声波检测数据
        if (typeof (jsonObject.response_ultrasonic_sensor_check_info.info_list) != "undefined")
        {

<<<<<<< HEAD
=======

>>>>>>> dev
            //超声波检测状态
            if (typeof (jsonObject.response_ultrasonic_sensor_check_info.check_enable) != "undefined")
            {
                this.objAvoidInfo.ultrasonicSensorEnable = parseInt(jsonObject.response_ultrasonic_sensor_check_info.check_enable);

                if (this.objAvoidInfo.ultrasonicSensorEnable === enumTypeUltrasonicSensorEnable.kUltrasonicSensorOpen)
                {
<<<<<<< HEAD

                    $("#id_bt_avoid_ultrasonicsensor_enable").text("检测");
                } else
                {
                    $("#id_bt_avoid_ultrasonicsensor_enable").text("不检测");
                }
            }

=======
                    $("#id_bt_avoid_ultrasonicsensor_enable").text("当前检测");
                } else
                {
                    $("#id_bt_avoid_ultrasonicsensor_enable").text("当前不检测");
                }
            }
            
>>>>>>> dev
            var value_data = jsonObject.response_ultrasonic_sensor_check_info.info_list;

            var itemElement = "";
            var parent = $("#id_page_state_m_avoid_ultrasonicsensor_list");
            //清除所有的子元素
            parent.empty();
            var json = value_data;


            //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}
            if (json.length > 0)
            {
                //清空
                this.objAvoidInfo.arrayUlrasonicSensorInfo = [];

                for (var i = 0, l = json.length; i < l; i++) {

                    //缓存文件数据
                    var childItemData = parseFloat(json[i]);
<<<<<<< HEAD



=======
                    
>>>>>>> dev
                    this.objAvoidInfo.arrayUlrasonicSensorInfo.push(childItemData);
                    //显示文件名信息	
                    var cl_flag = i % 2 + 1;
                    itemElement = '<div id="page_avoid_ultrasonicsensor_section' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
                    itemElement += '</div>';
                    $("#id_page_state_m_avoid_ultrasonicsensor_list").append(itemElement);
                }
<<<<<<< HEAD

=======
                
                //设置手动页面颜色状态
                window.objGlobalManage.objCusUiRefrush.refrushManualDetect(this.objAvoidInfo.arrayUlrasonicSensorInfo);
>>>>>>> dev
            } else
            {
                var parent = $("#id_page_state_m_avoid_ultrasonicsensor_list");
                //清除所有的子元素
                parent.empty();
                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '<p>没有数据！</p></div>';
                $("#id_page_state_m_avoid_ultrasonicsensor_list").append(itemElement);
            }
        }
    } else if (typeof (jsonObject.response_point_cloud_check_info) != "undefined")
    {

        //得到点云检测数据
        if (typeof (jsonObject.response_point_cloud_check_info.info_list) != "undefined")
        {
<<<<<<< HEAD


=======
>>>>>>> dev
            //点云检测状态
            if (typeof (jsonObject.response_point_cloud_check_info.check_enable) != "undefined")
            {

                this.objAvoidInfo.pointCloudEnable = parseInt(jsonObject.response_point_cloud_check_info.check_enable);

                if (this.objAvoidInfo.pointCloudEnable === enumTypePointCloudEnable.kPointCloudOpen)
                {
<<<<<<< HEAD

                    $("#id_bt_avoid_pointcloud_enable").text("检测");
                } else
                {
                    $("#id_bt_avoid_pointcloud_enable").text("不检测");
=======
                    $("#id_bt_avoid_pointcloud_enable").text("当前检测");
                    $("#id_content_manual_window_bt_det").text("当前检测");
                } else
                {
                    $("#id_bt_avoid_pointcloud_enable").text("当前不检测");
                    $("#id_content_manual_window_bt_det").text("当前不检测");
>>>>>>> dev
                }
            }

            var value_data = jsonObject.response_point_cloud_check_info.info_list;
            var itemElement = "";
            var parent = $("#id_page_state_m_avoid_pointcloud_list");
            //清除所有的子元素
            parent.empty();
            var json = value_data;


            //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}
            if (json.length > 0)
            {
                this.objAvoidInfo.arrayPointCloudInfo = [];

                for (var i = 0, l = json.length; i < l; i++) {
<<<<<<< HEAD

=======
>>>>>>> dev
                    //缓存文件数据
                    var objAvoidPointCloudData = new CusNameSpace.CusAvoidPointCloudData();
                    objAvoidPointCloudData.data_name = json[i].data_name;
                    objAvoidPointCloudData.data_value = parseFloat(json[i].data_value);
<<<<<<< HEAD
=======
                    
                    id_content_manual_could_info
>>>>>>> dev

                    this.objAvoidInfo.arrayPointCloudInfo.push(objAvoidPointCloudData);
                    //显示文件名信息	
                    var cl_flag = i % 2 + 1;
                    itemElement = '<div id="page_avoid_pointcloud_section' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + objAvoidPointCloudData.data_name + "</p>";
                    itemElement += '<p style="float: right;">' + objAvoidPointCloudData.data_value + "</p>";
                    itemElement += '</div>';
                    $("#id_page_state_m_avoid_pointcloud_list").append(itemElement);
                }
<<<<<<< HEAD
                //js动态加载的元素要重新添加事件绑定,否则无法触发事件
                $("#id_page_state_m_avoid_pointcloud_list").on("click", ".event_click", function (e) {
                    objGlobalVariable.objCusEventHandle.eventDivHandle(e);
                })
=======
                window.objGlobalManage.objCusUiRefrush.refrushManualDetectCould(this.objAvoidInfo.arrayPointCloudInfo);
>>>>>>> dev
            } else
            {
                var parent = $("#id_page_state_m_avoid_pointcloud_list");
                //清除所有的子元素
                parent.empty();
                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '<p>没有数据！</p></div>';
                $("#id_page_state_m_avoid_pointcloud_list").append(itemElement);
            }
        }
<<<<<<< HEAD
    } else if (typeof (jsonObject.response_ultrasonic_sensor_check_type) != "undefined")
=======
    }
    else if (typeof (jsonObject.response_ultrasonic_sensor_check_type) != "undefined")
>>>>>>> dev
    {
        //超声波检测设置结果返回
        if (typeof (jsonObject.response_ultrasonic_sensor_check_type.result) != "undefined")
        {
            var value_data = parseInt(jsonObject.response_ultrasonic_sensor_check_type.result);
            if (value_data == 1)
            {
                popTipWindowMsg("超声波检测设置成功");
            } else
            {
                popTipWindowMsg("超声波检测设置失败");
            }


        }
    } else if (typeof (jsonObject.response_point_cloud_check_type) != "undefined")
    {
        //点云检测设置结果返回
        if (typeof (jsonObject.response_point_cloud_check_type.result) != "undefined")
        {
            var value_data = parseInt(jsonObject.response_point_cloud_check_type.result);
            if (value_data == 1)
            {
                popTipWindowMsg("点云检测设置成功");
            } else
            {
                popTipWindowMsg("点云检测设置失败");
            }

        }
    } else if (typeof (jsonObject.response_dpoint) != "undefined")
    {
<<<<<<< HEAD

=======
>>>>>>> dev
        //CusProgramFilePosition
        //程序-点信息返回
        var program_file_name = jsonObject.response_dpoint.program_file_name;
        var map_name = jsonObject.response_dpoint.map_name;
        var dpoint_index = jsonObject.response_dpoint.dpoint_index;
<<<<<<< HEAD
        var dpoint_x = jsonObject.response_dpoint.dpoint_x;
        var dpoint_y = jsonObject.response_dpoint.dpoint_y;
        var dpoint_r = jsonObject.response_dpoint.dpoint_r;

        this.read_dpoint_x = dpoint_x;
        this.read_dpoint_y = dpoint_y;
        this.read_dpoint_r = dpoint_r;

        //var json = this.arrayProgramPosition;

        /*
         var findFileNameIndex = -1;
         for(var i=0,l=json.length;i<l;i++){
         
         if(this.arrayProgramPosition[i].fileName == map_name)
         {
         findFileNameIndex = i;
         break;
         }
         }*/

        //var itemFromFileName = this.arrayProgramPosition[findFileNameIndex];
        //itemFromFileName.mapName = map_name;
        //itemFromFileName.arrayPosition[dpoint_index].x = dpoint_x;
        //itemFromFileName.arrayPosition[dpoint_index].y = dpoint_y;
        //itemFromFileName.arrayPosition[dpoint_index].z = dpoint_z;
=======
        var dpoint_x = parseFloat(jsonObject.response_dpoint.dpoint_x);
        var dpoint_y = parseFloat(jsonObject.response_dpoint.dpoint_y);
        var dpoint_r = parseFloat(jsonObject.response_dpoint.dpoint_r);

       window.objGlobalManage.objCusProgramMode.read_dpoint_x = dpoint_x;
       window.objGlobalManage.objCusProgramMode.read_dpoint_y = dpoint_y;
       window.objGlobalManage.objCusProgramMode.read_dpoint_r = dpoint_r;
>>>>>>> dev

        $("#id_page_program_position_item_program_name").text(program_file_name);
        $("#id_page_program_position_item_map_name").text(map_name);
        $("#id_page_program_position_item_index").text(dpoint_index);

<<<<<<< HEAD
        $("#id_page_program_position_item_x").text(dpoint_x);
        $("#id_page_program_position_item_y").text(dpoint_y);
        var valueShow = dpoint_r * 180 / 3.1415926;
        $("#id_page_program_position_item_r").text(valueShow.toFixed(3));


        //显示程序-查看-子窗口
        objGlobalVariable.objCusEventHandle.windowShowHideProgramView("page_process_m_position_fileposition");
=======
        var valueShow = dpoint_x / 1000;// * 180 / 3.1415926
        $("#id_page_program_position_item_x").text(valueShow.toFixed(3) + " m");

        valueShow = dpoint_y / 1000;
        $("#id_page_program_position_item_y").text(valueShow.toFixed(3) + " m");

        valueShow = dpoint_r;
        $("#id_page_program_position_item_r").text(valueShow.toFixed(3) + " deg");
        
        /*
        DP[2] 71%,LASER,FINE,LINE,P,0.1,OP,Laser[1],DET:0
        2:1
        71:2
        LASER:3
        FINE:4
        LINE:5
        P:6
        0.1:7
        OP:8
        undefined:9
        undefined:10
        undefined:11
        OP:12
        1:13
        DET:14

        DP[1] 100%,IMU,FINE,LINE,P,0.1,VMark[0],Laser[0],NODET:0
        1:1
        100:2
        IMU:3
        FINE:4
        LINE:5
        P:6
        0.1:7
        VMark[0]:8
        VMark[0]:9
        VMark:10
        0:11
        undefined:12
        0:13
        NODET:14*/
        
        //MOVE_FREE  DP[2] 71%,LASER,FINE,LINE,P,0.1,VMark[1],Laser[1],DET,JMP LB[1]  //
        //MOVE_FREE  DP[2] 71%,LASER,FINE,LINE,P,0.1,OP,Laser[1],DET,JMP LB[1]  //
        //MOVE_FREE  DP[2] 71%,LASER,FINE,LINE,P,0.1,QR[1],Laser[1],DET,JMP LB[1]  //
        var reg=/DP\[(\d+)\]\s+(\d+)\%\s*[,]\s*(\w+)\s*,\s*(\w+)\s*,\s*(\w+)\s*,\s*(\w+)\s*,\s*(\d+\.\d+)\s*,((\s*(\w+)\[(\d+)\]\s*)|(OP)),\s*\w+\[(\d+)\]\s*,\s*(\w+)/;
        var dataValue = window.objGlobalManage.programSelInstraction;
        //var dataValue = "MOVE_FREE  DP[2] 71%,LASER,FINE,LINE,P,0.1,OP,Laser[1],DET,JMP LB[1]";
        //var dataValue = "MOVE_FREE  DP[2] 71%,LASER,FINE,LINE,P,0.1,VMark[1],Laser[1],DET,JMP LB[1]";
        //var dataValue = "MOVE_FREE  DP[2] 71%,LASER,FINE,LINE,P,0.1,QR[1],Laser[1],DET,JMP LB[1]";
        
        var arrAnalyze = reg.exec(dataValue);
       
        
        window.objGlobalManage.objCusProgramMode.instruction_speedratio = parseInt(arrAnalyze[2]);
        if(arrAnalyze[6] === "P")
        {
            window.objGlobalManage.objCusProgramMode.instruction_direction = 1;
            $('#id_page_program_position_item_direction').selectpicker('val', "正方向");
        }
        else
        {
            window.objGlobalManage.objCusProgramMode.instruction_direction = 0;
             $('#id_page_program_position_item_direction').selectpicker('val', "反方向");
        }
        
        var pointTypeFromCommand = parseInt(jsonObject.response_dpoint.dp_type);
        if(pointTypeFromCommand == enumTypeInstructionDpType.kDpTypeOp)
        {
            //普通点
           window.objGlobalManage.objCusProgramMode.instruction_dp_type = enumTypeInstructionDpType.kDpTypeOp;
           $("#id_page_program_position_l_c_vmarknumber").css("display","none");
           $("#id_page_program_position_l_c_qrcodenumber").css("display","none");
        }
        else
        {
            if(pointTypeFromCommand == enumTypeInstructionDpType.kDpTypeVmark)
            {
                window.objGlobalManage.objCusProgramMode.instruction_dp_type = enumTypeInstructionDpType.kDpTypeVmark; 
                window.objGlobalManage.objCusProgramMode.instruction_vmarknumber = parseInt(arrAnalyze[11]);
                $("#id_page_program_position_item_vmarknumber").val(window.objGlobalManage.objCusProgramMode.instruction_vmarknumber.toString());
                $("#id_page_program_position_l_c_vmarknumber").css("display","block");
                $("#id_page_program_position_l_c_qrcodenumber").css("display","none");
            }
            else if(pointTypeFromCommand == enumTypeInstructionDpType.kDpTypeQrCode)
            {
                window.objGlobalManage.objCusProgramMode.instruction_dp_type = enumTypeInstructionDpType.kDpTypeQrCode;
                window.objGlobalManage.objCusProgramMode.instruction_qrcodenumber = parseInt(arrAnalyze[11]);
                $("#id_page_program_position_item_qrcodenumber").val(window.objGlobalManage.objCusProgramMode.instruction_qrcodenumber.toString());
                $("#id_page_program_position_l_c_vmarknumber").css("display","none");
                $("#id_page_program_position_l_c_qrcodenumber").css("display","block");
            }
        }
        var objRegisterMsg = new CusNameSpace.ConstRegisterStatus();
        var tipsMsg = objRegisterMsg.kInstructionDpType.get(window.objGlobalManage.objCusProgramMode.instruction_dp_type);

        if(tipsMsg !== undefined)
        {
            $("#id_page_program_position_item_dptype").text(tipsMsg);
        }
        
        window.objGlobalManage.objCusProgramMode.instruction_lasernumber = parseInt(arrAnalyze[13]);

        if(arrAnalyze[14] === "DET")
        {
            window.objGlobalManage.objCusProgramMode.instruction_detect = 1;
            $('#id_page_program_position_item_detect').selectpicker('val', "探测障碍");
        }
        else
        {
            window.objGlobalManage.objCusProgramMode.instruction_detect = 0;
            $('#id_page_program_position_item_detect').selectpicker('val', "不探测障碍");
        }
        
        $("#id_page_program_position_item_speedratio").val(window.objGlobalManage.objCusProgramMode.instruction_speedratio.toString());     
        $("#id_page_program_position_item_lasernumber").val(window.objGlobalManage.objCusProgramMode.instruction_lasernumber.toString());
        //显示程序-查看-子窗口
        
        window.objGlobalManage.objCusEventHandle.windowShowHideProgramView("page_process_m_position_fileposition");
>>>>>>> dev

    } else if (typeof (jsonObject.response_di_name_info) != "undefined")
    {
        //DI name
        if (typeof (jsonObject.response_di_name_info.name_info) != "undefined")
        {
            var value_data = jsonObject.response_di_name_info.name_info;
            var json = value_data;
            this.arrayDiName = [];
            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {
                    this.arrayDiName[i] = json[i];
                }
            }
        }
    } else if (typeof (jsonObject.response_dido_value_info) != "undefined")
    {
        //DIDO
        if (typeof (jsonObject.response_dido_value_info.di_value_info) != "undefined")
        {
            var value_data = jsonObject.response_dido_value_info.di_value_info;
            var json = value_data;
            this.arrayDiState = [];
            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {
                    this.arrayDiState[i] = json[i];
                }
            }
        }
        if (typeof (jsonObject.response_dido_value_info.do_value_info) != "undefined")
        {
            var value_data = jsonObject.response_dido_value_info.do_value_info;
            var json = value_data;
            this.arrayDoState = [];
            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {
                    this.arrayDoState[i] = json[i];
                }
            }
        }


        //DI Show
        if (this.arrayDiName.length > 0)
        {
            var itemElement = "";
            var parent = $("#id_page_state_m_ioinfo_di_list");
            parent.empty();
            //清除所有的子元素

            var json = this.arrayDiName;
            for (var i = 0, l = json.length; i < l; i++) {

                var cl_flag = i % 2 + 1;

                if (this.arrayDiState[i] == enumTypeDiState.kDiClose)
                {
                    itemElement = '<div id="page_state_m_di' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid c_page_state_m_di_text c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
                    itemElement += '<p style="float: right;"> 关 </p></div>';

                } else
                {
                    itemElement = '<div style="background-color:green;"  id="page_state_m_di' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid c_page_state_m_di_text c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
                    itemElement += '<p style="float: right;"> 开 </p></div>';
                }
                $("#id_page_state_m_ioinfo_di_list").append(itemElement);
            }
        } else
        {

            var parent = $("#id_page_state_m_ioinfo_di_list");
            //清除所有的子元素
            parent.empty();

            var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
            itemElement += '<p>没有数据！</p></div>';

            $("#id_page_state_m_ioinfo_di_list").append(itemElement);
        }

        //DO
        if (this.arrayDoName.length > 0)
        {
            var itemElement = "";
            var parent = $("#id_page_state_m_ioinfo_do_list");
            //清除所有的子元素
            parent.empty();

            var json = this.arrayDoName;
            for (var i = 0, l = json.length; i < l; i++) {

                var cl_flag = i % 2 + 1;

                if (this.arrayDoState[i] == enumTypeDoState.kDoClose)
                {
                    itemElement = '<div id="page_state_m_do' + i;
                    itemElement += '" class="container-fluid c_page_state_m_do_text c_page_state_m_systeminfo_text' + cl_flag + '">';

                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
                    itemElement += '<button type="button" ';
                    itemElement += ' item-index="' + i + '"';
                    itemElement += ' class="btn btn-primary cl_bt_page_state_m_do_list" style="float: right;"> 关 </button></div>';
                } else
                {
                    itemElement = '<div style="background-color:green;" id="page_state_m_do' + i;
                    itemElement += '" class="container-fluid c_page_state_m_do_text c_page_state_m_systeminfo_text' + cl_flag + '">';

                    itemElement += '<p style="float: left;">' + json[i] + "</p>";
                    itemElement += '<button type="button" ';
                    itemElement += ' item-index="' + i + '"';
                    itemElement += ' class="btn btn-primary cl_bt_page_state_m_do_list" style="float: right;"> 开 </button></div>';
                }
                $("#id_page_state_m_ioinfo_do_list").append(itemElement);
                //绑定事件

            }
<<<<<<< HEAD
            $("#id_page_state_m_ioinfo_do_list").on("click", ".cl_bt_page_state_m_do_list", function (e) {
                objGlobalVariable.objCusEventHandle.eventBtHandle(e);
            })
=======
>>>>>>> dev
        } else
        {

            var parent = $("#id_page_state_m_ioinfo_do_list");
            //清除所有的子元素
            parent.empty();

            var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
            itemElement += '<p>没有数据！</p></div>';

            $("#id_page_state_m_ioinfo_do_list").append(itemElement);
        }
    } else if (typeof (jsonObject.response_do_name_info) != "undefined")
    {

        //DO Name
        if (typeof (jsonObject.response_do_name_info.name_info) != "undefined")
        {
            var value_data = jsonObject.response_do_name_info.name_info;
            //清除所有的子元素
            var json = value_data;
            this.arrayDoName = [];
            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {
                    this.arrayDoName[i] = json[i];
                }
            }
        }
<<<<<<< HEAD
    }

=======
    } else if (typeof (jsonObject.response_version_info) != "undefined")
    {
        //版本号信息
        if (typeof (jsonObject.response_version_info.controller_version) != "undefined")
        {
            var value_data = jsonObject.response_version_info.controller_version;
            //清除所有的子元素
            var json = value_data;

            //数据获取
            this.objControllerVersionInfo.arrayControllerVersionData = [];

            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {

                    var objControllerVersionData = new CusNameSpace.CusControllerVersionData();
                    objControllerVersionData.mode_name = json[i].mode_name;
                    objControllerVersionData.mode_version = json[i].mode_version;
                    objControllerVersionData.release_time = json[i].release_time;
                    this.objControllerVersionInfo.arrayControllerVersionData.push(objControllerVersionData);
                    //
                }
            }
            //数据显示
            var itemElement = "";
            var parent = $("#id_page_state_m_set_version_list");
            //清除所有的子元素
            parent.empty();

            var versionDataLen = this.objControllerVersionInfo.arrayControllerVersionData.length;
            //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}
            if (versionDataLen > 0)
            {

/*
<div style="float: left;width: 30%">
    <p>组件名字</p>
</div>
<div style="float: right;width: 30%">
    <p style="float: left" class="c_set_long_list_item">版本</p>
    <p style="float: right" class="c_set_long_list_item">发布日期</p>
</div>*/

                var itemElement = '<div id="page_set_m_version_section" item-index="" class="container-fluid event_click c_page_state_m_systeminfo_text1">'
                        + '<div style="float: left;width: 40%">'
                        + '<p>'
                        + '组件名字'
                        + '</p>'
                        + '</div>'
                        + '<div style="float: right;width: 60%">'
                        + '<p style="float:left;width:50%;">'
                        + '版本'
                        + '</p>'
                        + '<p style="float:right;width:50%;">'
                        + '发布日期'
                        + '</p>'
                        + '</div></div>';
                
                $("#id_page_state_m_set_version_list").append(itemElement);


                itemElement = '<div id="page_set_m_version_section" item-index="" class="container-fluid event_click c_page_state_m_systeminfo_text1">'
                        + '<div style="float: left;width: 40%">'
                        + '<p>'
                        + kWebModeName
                        + '</p>'
                        + '</div>'
                        + '<div style="float: right;width: 60%">'
                        + '<p style="float:left;width:50%;">'
                        + kWebVersion
                        + '</p>'
                        + '<p style="float:right;width:50%;">'
                        + kWebRelease
                        + '</p>'
                        + '</div></div>';
                
                $("#id_page_state_m_set_version_list").append(itemElement);


                for (var i = 0, l = versionDataLen; i < l; i++) {
                    var dataItem = this.objControllerVersionInfo.arrayControllerVersionData[i];

                    //显示文件名信息	
                    var cl_flag = i % 2 + 1;
                    itemElement = '<div id="page_set_m_version_section' + i;
                    itemElement += '" item-index="' + i + '"';
                    itemElement += ' class="container-fluid event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<div class="id_set_long_list" popflag="true">';
                    
                    itemElement += '<div style="float: left;width: 40%"><p>'
                    itemElement += dataItem.mode_name
                    itemElement += '</p></div><div style="float: right;width: 60%"><p style="float:left;width:50%;">'
                    itemElement += dataItem.mode_version
                    itemElement += '</p><p style="float:right;width:50%;">'
                    itemElement += dataItem.release_time
                    itemElement += '</p>'
                    itemElement += '</div>';
                    
                    itemElement += '</div></div>';
                    $("#id_page_state_m_set_version_list").append(itemElement);
                }
            }

        }
    } else if (typeof (jsonObject.response_register_info) != "undefined")
    {
        //注册信息接收
        this.objRegister.register_state = parseInt(jsonObject.response_register_info.register_status);
        this.objRegister.register_number = jsonObject.response_register_info.register_number;
        this.objRegister.lock_time = jsonObject.response_register_info.lock_time;
        this.objRegister.current_time = jsonObject.response_register_info.current_time;
        this.objRegister.license_number = jsonObject.response_register_info.license_number;

        var objRegisterMsg = new CusNameSpace.ConstRegisterStatus();


        if (!isNaN(this.objRegister.register_state))
        {
            var tipsMsg = objRegisterMsg.kConstRegisterStatus.get(this.objRegister.register_state);
            if (tipsMsg === undefined)
            {
                tipsMsg = "注册错误";
            }
            $("#id_page_set_m_register_state p").text("注册状态：" + tipsMsg);
            $("#id_page_set_m_register_serialnumber p").text("序列号：" + this.objRegister.register_number);
            $("#id_page_set_m_register_locktime p").text("锁机时间：" + this.objRegister.lock_time);
            $("#id_page_set_m_register_currenttime p").text("当前时间：" + this.objRegister.current_time);
            $("#id_page_set_m_register_registernumber input").val(this.objRegister.license_number);

            if (this.objRegister.register_state !== enumPOLLCODE_STATUS_TYPE.kENUM_TIME_NORMAL)
            {
                $("#id_page_set_m_register_state").css("color", "red");
            }
        }
    } else if (typeof (jsonObject.response_register) != "undefined")
    {

        //注册状态返回
        if (typeof (jsonObject.response_register.result) != "undefined")
        {
            var value_data = jsonObject.response_register.result;
  
            //清除所有的子元素
            if (value_data == 1)
            {
                this.objRegister.register_state = parseInt(jsonObject.response_register.register_status);
                this.objRegister.lock_time = jsonObject.response_register.lock_time;
                this.objRegister.license_number = jsonObject.response_register.license_number;

                if (!isNaN(this.objRegister.register_state))
                {
                    var objRegisterMsg = new CusNameSpace.ConstRegisterStatus();
                    var tipsMsg = objRegisterMsg.kConstRegisterStatus.get(this.objRegister.register_state);

                    if (tipsMsg === undefined)
                    {
                        tipsMsg = "注册错误";
                    }
                    $("#id_page_set_m_register_state p").text("注册状态：" + tipsMsg);
                    $("#id_page_set_m_register_serialnumber p").text("序列号：" + this.objRegister.register_number);
                    $("#id_page_set_m_register_locktime p").text("锁机时间：" + this.objRegister.lock_time);

                    if (this.objRegister.register_state === enumPOLLCODE_STATUS_TYPE.kENUM_TIME_NORMAL)
                    {
                        $("#id_page_set_m_register_state").css("color", "white");
                    }
                }
            } else
            {
                popTipWindowMsg("注册失败");
            }
            /*
             this.arrayDoName = [];
             if (json.length > 0)
             {
             for (var i = 0, l = json.length; i < l; i++) {
             this.arrayDoName[i] = json[i];
             }
             }*/
        }
    }
    else if (typeof (jsonObject.response_move_to_navgation_point) != "undefined")
    {
        //移动到点状态返回
        if (typeof (jsonObject.response_move_to_navgation_point.result) != "undefined")
        {
            var value_data = jsonObject.response_move_to_navgation_point.result;
            //清除所有的子元素
            if (value_data == 1)
            {
                popTipWindowMsg("移动到点成功");
            } else
            {
                popTipWindowMsg("移动到点失败");
            }
        }
    }
    else if (typeof (jsonObject.response_set_vmark_laser_filter_type) != "undefined")
    {
        //激光滤波状态返回
        if (typeof (jsonObject.response_set_vmark_laser_filter_type.result) != "undefined")
        {
            var value_data = parseInt(jsonObject.response_set_vmark_laser_filter_type.result);
            if (value_data === 1)
            {
                popTipWindowMsg("激光滤波类型设置成功");
            } else
            {
                popTipWindowMsg("激光滤波类型设置失败");
            }
        }
    }
    else if (typeof (jsonObject.response_set_call_vehicle) != "undefined")
    {
        //呼叫车辆
        if (typeof (jsonObject.response_set_call_vehicle.result) != "undefined")
        {
            var value_data = parseInt(jsonObject.response_set_call_vehicle.result);
            if (value_data === 1)
            {
                popTipWindowMsg("呼叫车辆成功");
            } else
            {
                popTipWindowMsg("呼叫车辆失败");
            }
        }
    }
    else if (typeof (jsonObject.response_set_shutdown) != "undefined")
    {
        //关机状态返回
        if (typeof (jsonObject.response_set_shutdown.result) != "undefined")
        {
            var value_data = jsonObject.response_set_shutdown.result;
            var shutdownType=parseInt(jsonObject.response_set_shutdown.shutdown_type);
            if (value_data === 1)
            {
                if(shutdownType === enumTypeShutDownType.kShutDown )
                {
                    popTipWindowMsg("正在关机...");
                }
                else
                {
                    popTipWindowMsg("正在重启...");
                }
                
            } else
            {
                if(shutdownType === enumTypeShutDownType.kShutDown )
                {
                    popTipWindowMsg("关机指令发送失败");
                }
                else
                {
                    popTipWindowMsg("重启指令发送失败");
                }
            }
        }
    }
    else if (typeof (jsonObject.response_vmark_debug_info) != "undefined")
    {	//vmark 调试信息
       
        if (typeof (jsonObject.response_vmark_debug_info.debug_info) != "undefined")
        {
            var value_data = jsonObject.response_vmark_debug_info.debug_info;
            var itemElement = "";
            var parent = $("#id_page_state_m_vmarkdebuginfo_list");
            //清除所有的子元素
            parent.empty();
            var json = value_data;
            if (json.length > 0)
            {
                for (var i = 0, l = json.length; i < l; i++) {
                    var cl_flag = i % 2 + 1;
                    //var valueData=Number(json[i].item_value).toFixed(3);
                    itemElement = '<div id="page_map_m_list_section' + i + '"';
                    itemElement += ' class="container-fluid c_page_state_m_systeminfo_text' + cl_flag + '">';
                    itemElement += '<p style="float: left;">' + json[i].item_name + "</p>";
                    itemElement += '<p style="float: right;">' + json[i].item_value + "</p>";
                    itemElement += '</div>';
                    $("#id_page_state_m_vmarkdebuginfo_list").append(itemElement);
                    
                }

            }
            else
            {
                var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
                itemElement += '<p>没有数据！</p></div>';
                $("#id_page_state_m_vmarkdebuginfo_list").append(itemElement);
            }
        }
    }
>>>>>>> dev
};

CusNameSpace.CusUpdateTopState.prototype.updateProgramFileLine = function (selIndex) {

    //程序打开列表
    var fileNameCount = this.arrayProgramPosition.length;


    if (selIndex < fileNameCount)
    {
<<<<<<< HEAD
        var value_data = this.arrayProgramPosition[selIndex].arrayFileData;
=======
        var value_data = this.arrayProgramPosition[selIndex].GetArrayFileDataToShow();
        
>>>>>>> dev
        var itemElement = "";
        var elementParentId = "id_page_m_process_position_fileline";

        var parent = $("#" + elementParentId);

        //清除所有的子元素
        parent.empty();

        var json = value_data;
        //{"response_robot_program_file_list":{"file_list":["msg","msg","msg","msg","msg"]}}
        if (json.length > 0)
        {
            for (var i = 0, l = json.length; i < l; i++) {

                var cl_flag = i % 2 + 1;
<<<<<<< HEAD
                itemElement = '<div id="id_page_process_m_position_fileline' + i;
                itemElement += '" item-index="' + i + '"';
                itemElement += ' class="container-fluid c_page_m_process_position_fileline event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                itemElement += '<p style="float: left;width:90%;text-align: left;">' + json[i] + "</p>";

                if (this.arrayProgramPosition[selIndex].file_current_line == i)
                {
                    itemElement += '<img class="page_process_m_open_list_n" src="img/list_select_s.png"  style="float: right;width: 25px;height: 25px;float: right;"/></div>';
                } else
                {
                    itemElement += '<img class="page_process_m_open_list_n" src="img/list_select_n.png"  style="float: right;width: 25px;height: 25px;float: right;"/></div>';
                }

                $("#" + elementParentId).append(itemElement);
            }

            //js动态加载的元素要重新添加事件绑定,否则无法触发事件
            $("#" + elementParentId).on("click", ".event_click", function (e) {
                objGlobalVariable.objCusEventHandle.eventDivHandle(e);
            })
=======
                
                var baseAdd = 20;
                var baseHeight = 30;
                var lineCharacterCount=43;
                var itemHeightReal = 0;
                itemHeightReal = baseHeight+(json[i].length/lineCharacterCount)*baseAdd;
                
                
                itemElement = '<div style="height:'+itemHeightReal+'px;" id="id_page_process_m_position_fileline' + i;
                itemElement += '" item-index="' + i + '"';
                itemElement += ' class="container-fluid c_page_m_process_position_fileline event_click c_page_state_m_systeminfo_text' + cl_flag + '">';
                itemElement += '<p style="float: left;width:100%;text-align: left;height: auto; word-wrap:break-word; word-break:break-all;overflow: hidden;">' + json[i] + "</p>";
                itemElement += '</div>';

                if (this.arrayProgramPosition[selIndex].file_current_line == i)
                {
                    $("#id_page_process_m_position_fileline" + i).addClass("c_page_state_m_systeminfo_text_sel");
                }
                $("#" + elementParentId).append(itemElement);
            }
>>>>>>> dev
        } else
        {
            var parent = $("#" + elementParentId);
            //清除所有的子元素
            parent.empty();
            var itemElement = '<div class="container-fluid c_page_state_m_systeminfo_text1">';
            itemElement += '<p>没有数据！</p></div>';
            $("#" + elementParentId).append(itemElement);
        }
    }
};
